<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich"
	xmlns:ctg="http://www.crotouristguide.com/taglib">

<ui:composition template="/templates/layout/columns_1.xhtml">

	<ui:define name="column1">
		<s:div styleClass="title"><h1>
			<h:outputText value="#{messages['title.objave.list']}" />
		</h1></s:div>
		<rich:dataTable columns="1" value="#{objave}" var="o" width="100%" styleClass="list" columnClasses="rich-separator,rich-separator">
			<h:column>
			    <h4><h:outputText value="#{messages[stringUtil.merge('label.tip_objave.',o.tipObjave.idTipaObjave)]}"/></h4>
				<h3><h:outputLink value="http://#{o.www}" styleClass="pnlObjave"><h:outputText value="#{o.naslov}" /></h:outputLink></h3>
				<p><h:outputText value="#{o.stranica}" styleClass="site" /></p>
				<p><h:outputText value="#{o.tekst}" />...
				<h:outputLink value="http://#{o.www}" styleClass="pnlObjave special2">
					<h:outputText value="#{messages['label.link.more']}"></h:outputText>
				</h:outputLink></p>
				<s:link value="#{messages['label.edit']}"
					rendered="#{identity.hasRole('1') and param.idMjesta != null}"
					action="#{objavaAction.editSetup('backToObjaveMjesta')}"/>
				<s:link value="#{messages['label.edit']}"
					rendered="#{identity.hasRole('1') and param.idOtoka != null}"
					action="#{objavaAction.editSetup('backToObjaveOtoci')}"/>
				<s:link value="#{messages['label.edit']}"
					rendered="#{identity.hasRole('1') and param.idParka != null}"
					action="#{objavaAction.editSetup('backToObjaveParkovi')}"/>
				<s:link value="#{messages['label.edit']}"
					rendered="#{identity.hasRole('1') and param.idObjekti != null}"
					action="#{objavaAction.editSetup('backToObjaveObjekti')}"/>															
			</h:column>
		</rich:dataTable>	
		<script type="text/javascript">
		 jQuery(function() {	 
			 jQuery('a.pnlObjave').click(function() {
				new Boxy('<iframe frameborder="0" marginheight="0" marginwidth="0" class="loading" src="' + this.href + '">Test</iframe>',{title:'#{messages['subtitle.objava']}'}).resize(900,700);
				return false; 
			 });
		 });
		</script>		
	</ui:define>
	<ui:define name="column2">
		<s:cache key="dojmovi_column2_#{param.idObjekta}_#{currentLang}"
			region="pageFragments">
		
		</s:cache>
	</ui:define>
</ui:composition>

</html>